<template>
  <div>
    <nav>
      <button @click="currentComponent = 'Game'">游戏</button>
      <button @click="currentComponent = 'TodoList'">待办事项</button>
    </nav>
    <component :is="currentComponent"></component>
  </div>
</template>

<script>
import Game from './components/game.vue';
import TodoList from './components/todo-list.vue';

export default {
  components: {
    Game,
    TodoList
  },
  data() {
    return {
      currentComponent: 'Game'
    };
  }
};
</script>